package com.jiyun.dao;

import com.jiyun.entity.Student;
import com.jiyun.vo.StudentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface StudentMapper extends tk.mybatis.mapper.common.Mapper<Student>{

    @Select("SELECT\n" +
            "\ts.*,\n" +
            "\tg.gname,\n" +
            "\tc.cname \n" +
            "FROM\n" +
            "\t`student` s,\n" +
            "\tgrade g,\n" +
            "\tclass c \n" +
            "WHERE\n" +
            "\ts.gid = g.gid \n" +
            "\tAND s.cid = c.cid")
    public List<StudentVo> findAll2();

 //   public List<StudentVo> findAll3(StudentVo studentVo);

}
